package com.ruoyi.web.controller.task;

import com.ruoyi.system.biz.CashHistoryBizService;
import lombok.RequiredArgsConstructor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@RequiredArgsConstructor
@ConditionalOnProperty(value = "spring.profiles.active", havingValue = "prod")
public class CashHistoryTask {

    private final CashHistoryBizService cashHistoryBizService;

    //每天凌晨 过一分 统计商户昨日数据
    //每天凌晨2点30 检查数据是否有误
    @Scheduled(cron = "0 30 1 * * ? ")
    public void checkError() {
        cashHistoryBizService.checkError();
    }


}
